<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <base href="<%=basePath%>"/>    
    <title>群聚网</title>    
	<meta http-equiv="pragma" content="no-cache"/>
	<meta http-equiv="cache-control" content="no-cache"/>
	<meta http-equiv="expires" content="0"/>    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
	<meta http-equiv="description" content="This is my page"/>
	 <link rel="stylesheet" href="/css/pager.css" type="text/css"></link>
	<script type="text/javascript" src="/js/jquery-1.4.4.min.js"></script>
	
	<script src="js/formValidator-4.1.0.js" type="text/javascript" charset="UTF-8"></script>
	<script src="js/formValidatorRegex.js" type="text/javascript" charset="UTF-8"></script>
	<script language="javascript" src="js/DateTimeMask.js" type="text/javascript"></script>
	
	<!--[if lte IE 6]>
	<link type="text/css" rel="stylesheet" href="Css/calendarIE6.css" >
	<![endif]--> 
	<!--[if gte IE 7]>
	<link type="text/css" rel="stylesheet" href="Css/calendar.css" >
	<![endif]--> 
	<![if !IE]> 
	<link type="text/css" rel="stylesheet" href="css/calendar.css" />
	<![endif]>
	<script type="text/javascript" src="js/calendar.js" ></script>  
	<script type="text/javascript" src="js/calendar-zh.js" ></script>
	<script type="text/javascript" src="js/calendar-setup.js"></script>
	<script type="text/javascript" src="js/ShouHu.js"></script>

	<script type="text/javascript" src="/js/pageView.js"></script> 
	<script src="js/taobao.js"></script>
	<script src="/js/jquery.KinSlideshow-1.2.1.min.js" type="text/javascript"></script>
	<script type="text/javascript" src="/js/uploadify/swfobject.js"></script>
	<script type="text/javascript" src="/js/uploadify/task_jquery.uploadify.v2.1.4.js"></script>
	<link href="/css/uploadify.css" type="text/css" rel="stylesheet" />
		 <script type="text/javascript">
	    //打开页面随机选择 切换方式（方向）,怕增大KinSlideshow.js文件 就没把随机切换写到里面。
		//使用时如有需要随机自己写在前面是一样的。而且还可以只固定随机切换哪几种。
		
		var moveStyle
		var rand =parseInt(Math.random()*4)
		switch(rand){
			case 0:	moveStyle="left" ;break;
			case 1:	moveStyle="right" ;break;
			case 2:	moveStyle="down" ;break;
			case 3:	moveStyle="up" ;break;
		}
		$(function(){
			$("#KinSlideshow1").KinSlideshow({moveStyle:moveStyle});
			
		})
	function checkScose(){	
			var manCount=$("#manCount").val();
			var sumMoney=$("#sumMoney").val();
			//var aa=;
			$("#manMoney").val(parseInt(sumMoney)/parseInt(manCount));
			//alert( );
			}	
			 
		</script>
	 <script type="text/javascript">
	 $(document).ready(function(){
			$.formValidator.initConfig({formID:"packForm",theme:"ArrowSolidBox",debug:false,submitOnce:true,
				onError:function(msg,obj,errorlist){
					$("#errorlist").empty();
					$.map(errorlist,function(msg){
						$("#errorlist").append("<li>" + msg + "</li>")
					});
					alert(msg);
				},
				submitAfterAjaxPrompt : '有数据正在异步验证，请稍等...',
				onShowClass : "",
				onFocusClass : "",
				onCorrectClass : ""
			});
			$("#tcmc").formValidator({onShow:"请填写活动名称",onFocus:"填写活动名称,活动至少2个字符,最多20个字符",onCorrect:"可以使用"}).inputValidator({min:2,max:20,onError:"你输入的活动名称不正确,请确认"})//.regexValidator({regExp:"username",dataType:"enum",onError:"用户名格式不正确"})
			//$("#manCount").formValidator({autoModify:true,onShow:"请输男生人数",onFocus:"只能输入大于1的数字",onCorrect:"恭喜你,你输对了"}).inputValidator({min:1,max:100000,type:"value",onErrorMin:"你输入的值必须大于等于1",onError:"数值有误，请确认"}).defaultPassed();
			//$("#womanCount").formValidator({autoModify:true,onShow:"请输女生人数",onFocus:"只能输入大于1的数字",onCorrect:"恭喜你,你输对了"}).inputValidator({min:1,max:100000,type:"value",onErrorMin:"你输入的值必须大于等于1",onError:"数值有误，请确认"}).defaultPassed();
			$("#manCount").formValidator({onShow:"请输男生人数",onCorrect:"你的数字正确"}).regexValidator({regExp:"num",dataType:"enum",onError:"数字格式不正确"});
			$("#womanCount").formValidator({onShow:"请输女生人数",onCorrect:"你的数字正确"}).regexValidator({regExp:"num",dataType:"enum",onError:"数字格式不正确"});
			$("#activityinfoContext").formValidator({onShow:"请输入你的描述",onFocus:"描述至少要输入10个汉字或20个字符",onCorrect:"恭喜你,你输对了",defaultValue:""}).inputValidator({min:20,onError:"你输入的描述长度不正确,请确认"});
	 });		
	</script>

  </head>
  
  <body>
     <%@ include file="/hader.jsp"%> 
   <div class="wrapper">
	<div class="banner fl">
		<div id="KinSlideshow1" style="visibility:hidden;"> 
			<a href="#"><img src="images/banner_01.jpg" alt="" width="724" height="220" /></a> 
			<a href="#"><img src="images/banner_02.jpg" alt="" width="724" height="220" /></a> 
			<a href="#"><img src="images/banner_03.jpg" alt="" width="724" height="220" /></a> 
			<a href="#"><img src="images/banner_04.jpg" alt="" width="724" height="220" /></a> 
		</div>
	</div>
	<div class="banner_right fr"> <a href="#"><img src="images/index_05.jpg" alt="" title="手机版" /></a><a href="#"><img src="images/index_06.jpg" alt="" title="HD版" /></a> </div>
	<div class="cb"></div>
	<div class="huodong_left fl">
		<div class="huodong">
			<div class="t">商家列表</div>
			<div class="cc">
				<div class="mo_wp">
					<div class="mo_title">
						<div class="mo_title_l">KTV(${bz1})</div>
					</div>
					<div class="mo_con">
					<c:forEach items="${businessinfolist1}" var="lf" >
						<li><a href="#">${lf.businessName}</a></li>
					</c:forEach>
					</div>
				</div>
				<div class="mo_wp">
					<div class="mo_title">
						<div class="mo_title_l">酒吧(${bz2})</div>
					</div>
					<div class="mo_con">
						<c:forEach items="${businessinfolist2}" var="ls" >
							<li><a href="#">${ls.businessName}</a></li>
						</c:forEach>
					</div>
				</div>
				<div class="mo_wp">
					<div class="mo_title">
						<div class="mo_title_l">别墅聚会(${bz3})</div>
					</div>
					<div class="mo_con">
						<c:forEach items="${businessinfolist3}" var="bl" >
							<li><a href="#">${bl.businessName}</a></li>
						</c:forEach>
					</div>
				</div>
				<div class="cb"></div>
			</div>
			<div class="cb"></div>
			<div><img src="images/huodong_03.jpg" alt="" /></div>
		</div>
	</div>
	<form action="/business.do?method=addActivity" method="post" id="packForm" enctype="multipart/form-data" > 
	<div class="fqhd fl">
		<div class="t">发起活动</div>
		<div class="tj">
			<table cellpadding="0" cellspacing="0" width="100%" border="0">
				<tr>
					<td width="29%" align="right" valign="top">活动总费用：</td>
					<td width="71%" align="left" valign="top"><input id="sumMoney" readonly="readonly" value="${p.zhekou }" type="text" class="input1" /><br /><span>此活动的预计总费用</span></td>
					
				</tr>
				<tr>
					<td align="right" valign="top">男生人均费用：</td>
					<td align="left" valign="top"><input id="manMoney" readonly="readonly" name="activityinfoPrice" path="activityinfo.activityinfoPrice" type="text" class="input1" /><br /><span>此价格是男生参与聚会的应付款，女生参与聚会无需付款。</span></td>
					<input type="hidden" name="packageInfoId" path="activityinfo.packageInfoId" value="${p.id }" />
					<input type="hidden" name="businessInfoId" path="activityinfo.businessInfoId" value="${p.businessInfoId }" />
				</tr>
				<tr>
					<td align="right" valign="top">商户名称：</td>
					<td align="left" valign="top"><span>${binfo.businessName}</span>
						<br /><span>选择要在哪个商家聚会</span></td>
				</tr>
				<tr>
					<td align="right" valign="top">套餐名称：</td>
					<td align="left" valign="top">
							${p.packageName }
						<input name="acount"  path="activityinfo.acount" type="text" class="w50 input1" />
						&nbsp;份<br /><span>选择消费套餐以及份数，其中套餐最少选择一种，最多可选四种</span></td>
				</tr>
				<tr>
					<td align="right" valign="top">活动主题：</td>
					<td align="left" valign="top"><input id="tcmc" name="activityinfoName" path="activityinfo.activityinfoName" type="text" class="input1" /><span id="tcmcTip"></span><br /><span>填写主题活动，例如：“狂欢派对”，“交友派对”等</span></td>
				</tr>
				<tr>
					<td align="right" valign="top">男生人数：</td>
					<td align="left" valign="top"><input id="manCount" onchange="checkScose()" name="manCount" type="text" path="activityinfo.manCount" class="input1" /><span id="manCountTip"></span><br /><span>预定参与聚会的男生人数，等到活动生效日期来临，若此活动男生人数仍不足，则活动自动关闭，退还定金。</span></td>
				</tr>
				<tr>
					<td align="right" valign="top">女生人数：</td>
					<td align="left" valign="top"><input id="womanCount"  name="womanCount" type="text" path="activityinfo.womanCount" class="input1" /><span id="womanCountTip"><br /><span>预定参与聚会的女生人数。等到活动生效日期来临，若男生中没有人退出活动，活动生效时。女生可随时加塞凑满人数。</span></td>
				</tr>
				<tr>
					<td align="right" valign="top">活动开始时间：</td>
					<td align="left" valign="top">
					<div id="JpDate"><dl>
		              <span style="float:left">
		              		<input type="text" id="EntTime02" name="beginTime"  path="activityinfo.beginTime" class="JpTextDate" />
		              </span>
		              <span style="float:left">
		              	<img src="images/QN1CS1.gif" width="16" height="13" onclick="return showCalendar('EntTime02', 'y-mm-dd');"/>
		              </span>
		            </dl></div>
					</td>
				</tr>
				<tr>
					<td align="right" valign="top">活动结束时间：</td>
					<td align="left" valign="top">
					
					<div id="JpDate"><dl>
		              <span style="float:left">
		              		<input type="text" id="EntTime01" name="endTime"  path="activityinfo.endTime" class="JpTextDate" />
		              </span>
		              <span style="float:left">
		              	<img src="images/QN1CS1.gif" width="16" height="13" onclick="return showCalendar('EntTime01', 'y-mm-dd');"/>
		              </span>
		            </dl></div>
					
					</td>
				</tr>
				<tr>
					<td align="right" valign="top">活动备注：</td>
					<td align="left" valign="top"><textarea id="activityinfoContext" name="activityinfoContext" path="activityinfo.activityinfoContext" cols="" rows="" class="input1 w300 h59"></textarea><span id="activityinfoContextTip"></span><br /><span>活动备注内容</span></td>
				</tr>
				<tr>
					<td align="right" valign="top">生效日期：</td>
					<td align="left" valign="top">2012-05-28<br /><span>即活动开始到前24小时之内，进入此阶段，该活动所有参与人不可以退款。活动发起人或者聚会当事人向商家预约消费。</span></td>
				</tr>
			</table>
		</div>
		<div align="center" style="padding-bottom:30px">
			<input name="" type="submit" class="btn01" value="提交" />
		</div>
		<div class="t">【温馨提示】</div>
		<div class="tj">
			<table cellpadding="0" cellspacing="0" width="90%" border="0">
				<tr>
					<td width="29%" align="right" valign="top">套餐摘要：</td>
					<td width="71%" align="left" valign="top">${p.packageSummary }</td>
				</tr>
				<tr>
					<td width="29%" align="right" valign="top">套餐说明：</td>
					<td width="71%" align="left" valign="top">${p.packageExplain }</td>
				</tr>
				<tr>
					<td width="29%" align="right" valign="top">附加费提示：</td>
					<td width="71%" align="left" valign="top">${p.additionalTips }</td>
				</tr>
			</table>
		</div>
		<div align="center"> 
		
		<c:forEach items="${img}" var="pimg" >
		<img src="images/packageImg/${pimg.imgName }" alt="" width="400" height="267" />
					</c:forEach>
		  </div>
		<div class="cb"></div>
	</div>
	</form>
	<div class="fqhd_right fr">
		<div class="map">${binfo.mapurl}</div>
		<div class="mapview"></div>
	地址：${binfo.businessAddress}<br />
			营业时间：${binfo.beginTime}-${binfo.endTime}<br />
			电话：${binfo.businessTel}<br />
			交通指南：${binfo.busInformation}<br />
			简介：${binfo.introduce}
		<p> 
		<c:forEach items ="${bimg}" var="b">
				<img src="/images/businessImg/${b.imgname}" alt="" width="185" height="123" />
			</c:forEach>
		 </p>
	</div>
	<div class="cb"></div>
</div>
<%@ include file="/footer.html"%> 
  </body>
</html>
